<template style="overflow-y: scroll; overflow-x: hidden; height: 100%">
  <el-drawer
    title="登记物料"
    size="61%"
    :visible.sync="visibility"
    custom-class="demo-drawer"
  >
    <div class="demo-drawer__content">
      <el-form ref="dataForm" :rules="rules" :model="temp">
        <el-form-item>
          <el-table :data="list" highlight-current-row>
            <el-table-column label="货号" width="100px" />
            <el-table-column label="货品识别码" min-width="100px" />
            <el-table-column label="货品简称" width="100px" />
            <el-table-column label="单位" width="160px" />
            <el-table-column label="规格" width="100px" />
            <el-table-column label="批号" width="100px" />
            <el-table-column label="浓度" width="100px" />
            <el-table-column label="过期日期" width="100px" />
            <el-table-column label="计划使用量" width="100px" />
            <el-table-column label="实际使用量" width="100px" />
            <el-table-column width="120">
              <template slot-scope="{ row }">
                <el-button type="text" @click="handleRemove(row)">
                  编辑
                </el-button>
                <el-button type="text" @click="handleRemove(row)">
                  删除
                </el-button>
              </template>
            </el-table-column>
          </el-table>
        </el-form-item>
        <el-form-item>
          <el-button @click="handleClose">取 消</el-button>
          <el-button type="primary" @click="handleCommit"> 确 定 </el-button>
        </el-form-item>
      </el-form>
    </div>
  </el-drawer>
</template>

<script>
export default {
  props: {
    visible: {
      required: true,
      type: Boolean
    },
    currentTask: {
      type: Object,
      default: null
    }
  },
  data() {
    return {
      loading: false,
      temp: {},
      rules: {
        // receiveUserName: [
        //   { required: true, message: '生产员不可为空', trigger: 'blur' }
        // ]
      },
      list: []
    }
  },
  computed: {
    visibility: {
      get() {
        return this.visible
      },
      set(val) {
        this.$emit('update:visible', val)
      }
    }
  },
  watch: {
    visible(value) {
      if (value) {
        // this.reset()
      }
    }
  },
  methods: {
    handleOpenAddEquipment() {},
    handleClose() {
      this.visibility = false
    },
    handleCommit() {
      this.visibility = false
    }
  }
}
</script>

<style lang="scss">
</style>
